<template>
    <div class="cuiInput">
        <slot name="icon"></slot>
        <input v-model="val" type="text" :placeholder="placeholder ? placeholder : '请输入'" />
    </div>
</template>
<script setup>
import { defineProps, defineModel } from 'vue'
const val = defineModel({
    defaultValue: '',
})
const props = defineProps({
    placeholder: String,

})
</script>
<style scoped>
.cuiInput {
    display: flex;
    width: 100%;
    border: 1px solid #ccc;
}

.cuiInput input {
    flex: 1;
    border: none;
    outline: none;
    width: 100%;
}
</style>
<!--
     v-bind=$attrs

即将要实例化vue

v-model关键字
definemodeol

-->